# Copyright (C) 2004 Dilip Antony Joseph <dilip@cs.berkeley.edu>
#  
# This file is free software; as a special exception the author gives
# unlimited permission to copy and/or distribute it, with or without 
# modifications, as long as this notice is preserved.
# 
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.


# You need to make sure that the following variable points to the main
# generic_proxy directory relative to the current directory.
GENERIC_PROXY_DIR=../../OCALA/generic_proxy
GENERIC_PROXY_INCLUDES = -I$(GENERIC_PROXY_DIR) -I$(GENERIC_PROXY_DIR)/ocd -I$(GENERIC_PROXY_DIR)/utils -I$(GENERIC_PROXY_DIR)/oci


I3_SRC_PATH=../
INCLUDES = -I$(I3_SRC_PATH)i3 -I$(I3_SRC_PATH)i3_client -I$(I3_SRC_PATH)utils $(GENERIC_PROXY_INCLUDES)

noinst_PROGRAMS=genI3MiddleBoxConf
noinst_LTLIBRARIES = libI3Overlay.la

libI3Overlay_la_SOURCES = i3CommonHeaders.h i3Debug.h I3Functor.h I3Packet.h\
			 I3OverlayNetwork.h I3OverlayNetwork.cpp \
			 I3OverlayNetwork_triggerEvents.cpp\
			 I3OverlayNetwork_Layer.cpp\
			 I3Key.h I3Key.cpp \
			 I3Id.h I3Id.cpp \
			 PublicTrigger.h PublicTrigger.cpp\
			 I3AddressBook.h I3AddressBook.cpp\
			 I3ConfigFile.h\
			 I3TriggerConfigFile.h\
			 I3Trigger.h I3Trigger.cpp\
			 I3OCDStateInfo.h I3OCDStateInfo.cpp\
			 I3TimerEvent.h  I3TimerEvent.cpp\
			 I3ClientContext.h I3ClientContext.cpp\
			 I3Params.h 

libI3Overlay_la_LDFLAGS = -shared -Wl,-soname,libI3OCD.so -o libI3OCD.so
libI3Overlay_la_LIBADD = ../i3_client/libi3client.a ../aeshash/libaes.a ../utils/libutils.a ../i3/libi3.a

MOSTLYCLEANFILES=libI3OCD.so

genI3MiddleBoxConf_SOURCES=genI3MiddleBoxConf.cpp 
genI3MiddleBoxConf_LDADD=I3Id.o ../i3_client/libi3client.a ../utils/libutils.a ../i3/libi3.a ../../OCALA/generic_proxy/utils/libUtils.a ../aeshash/libaes.a
# stg:
# on APPLE, a dylib is created through '/usr/bin/libtool -dynamic -o libi3OCD.dylib <object files>'
# I am not familiar enough with the libtool build system to get this working, though :-(
